package com.hqq.action.clazz.command;

/**
 * CommandTest
 * 命令模式
 * 目的就是达到命令的发出者和执行者之间解耦，实现请求和执行分开
 * Created by heqianqian on 2017/3/11.
 */
public class CommandTest {
    public static void main(String[] args) {
        Receiver receiver = new Receiver();
        Command command = new MyCommand(receiver);
        Invoker invoker = new Invoker(command);
        invoker.action();
    }
}
